package com.ishansong.gis.tool;

/**
 * Created by danqiang on 2017/7/6.
 * 启动类
 */
class Do {

    public static void main(String[] args) {
        Commander.ArgsHolder commanderArgsHolder = new Commander().parse(args);

        MTProcessor mtProcessor = new MTProcessor(commanderArgsHolder.threadNum, commanderArgsHolder.oldSeeds, commanderArgsHolder.newSeeds);
        switch (commanderArgsHolder.task) {
            case IMPORT:
                mtProcessor.start(new Import(commanderArgsHolder));
                break;
            case PERF_READ:
                mtProcessor.start(new PerfRead(commanderArgsHolder));
                break;
            case PERF_WRITE:
                mtProcessor.start(new PerfWrite(commanderArgsHolder));
                break;
            case PERF_COUNT:
                mtProcessor.start(new PerfCount(commanderArgsHolder));
                break;
            default:
                mtProcessor.start(new Import(commanderArgsHolder));
        }
    }

}
